from typing import Optional, Any, List
from pydantic import BaseModel

class ResponseBase(BaseModel):
    code: int = 200
    message: str = "Success"

class DataResponse(ResponseBase):
    data: Any = None

class ListResponse(ResponseBase):
    total: int = 0
    items: List[Any] = []

class ErrorResponse(ResponseBase):
    code: int = 400
    message: str = "Error"
    detail: Optional[str] = None 